<!doctype html>
<html>
<head>
<title><?=$title;?></title>
<meta charset="utf-8" />
<meta generator="csscreator.com" />

<!--<link rel="stylesheet" href="<?=base_url();?>css/style.css" type="text/css" />-->
<link rel="stylesheet" href="<?=base_url();?>css/menu.css" type="text/css" />
<link rel="stylesheet" href="<?=base_url();?>css/form.css" type="text/css" />
<!-- update arp -->
<link rel="stylesheet" href="<?php echo base_url('style/style.css');?>" type="text/css" />
<link rel="icon"  href="<?php echo base_url('favicon.ico');?>"/> 
<link rel="apple-touch-icon" href="<?php echo base_url('favicon.ico');?>" />

<script type="text/javascript" src="<?=base_url();?>js/calendar.js"></script>
<script type="text/javascript" src="<?=base_url();?>js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="<?=base_url();?>js/sliding.form.js"></script>
<script type="text/javascript" src="<?=base_url();?>js/stack-1.js"></script>
<script type="text/javascript" src="<?=base_url();?>js/stack-2.js"></script>
<script type="text/javascript" src="<?php echo base_url('style/fx.js');?>"></script>
<script type="text/javascript" src="<?php echo base_url('style/hoverintent_mini.js');?>"></script>

<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<!-- Please link back to http://csscreator.com -->
</head>
<body>
<div id="pagewidth">
	<header>
    	<div id="header">
		<a href="<?php
			if($this->session->userdata('id_hak') == 3)
			{
				echo ''.base_url().'index.php/alumni/alumni/preview_by_user';
			}
			else if($this->session->userdata('id_hak') == ''){
				echo site_url('');
			}
			else{
				echo '#';
			}
		
		?>">
		<div class="logo"><img src="<?php echo base_url('style/images/logo-ecamp.png');?>" /></div></a>
        <?php if($this->session->userdata('id_hak')){ ?>
			<a href="<?php echo site_url('admin_home/logout');?>">
       			<div class="log">
        			<div class="icon"><img src="<?php echo base_url('style/images/icon-logout.jpg');?>"/></div>Member Logout
        		</div>
            </a>
             <div class="text">
				<?php
					$name = $this->session->userdata('username');
					
					if($this->session->userdata('id_hak') == 2)
					{
						$lisensi_name = $this->session->userdata('nama_lisensi');
						$url_cp = site_url('lisensi/edit_cp_lisensi/edit');
						$url_pass = site_url('user/user_management/form_ganti_pass');
						echo'
							<strong>Selamat datang '.$name.' (Admin '.$lisensi_name.')</strong><br/>
							<small><a href="'.$url_cp.'">Ubah Data Contact Person | </a></small>
							<small><a href="'.$url_pass.'">Ubah Password</a></small>
						';
					}
					
					else if($this->session->userdata('id_hak') == 1)
					{
						
						echo'
							<strong>Selamat datang '.$name.' (Administrator Pusat)</strong><br/>
						';
						$lisensi_name = $this->session->userdata('nama_lisensi');
						
						$url_cp = site_url('lisensi/edit_cp_lisensi/edit');
						$url_pass = site_url('user/user_management/form_ganti_pass');
						if($lisensi_name != '')
						{
							echo'
								<strong>(Sekarang Anda juga sebagai Admin '.$lisensi_name.')</strong><br/>
								<small><a href="'.$url_cp.'">Ubah Data Contact Person | </a></small>
								<small><a href="'.$url_pass.'">Ubah Password</a></small>
							';
						}
						else
						{
							echo'
								<small><a href="'.$url_pass.'">Ubah Password</a></small>
							';
						}
					}
					
					else{
						$url_pass = site_url('user/user_management/form_ganti_pass');
						
						echo'
							<strong>Selamat datang '.$name.'</strong><br/>
							<small><a href="'.$url_pass.'">Ubah Password</a></small>
						';
					}
				?>
            	
            </div>
		<?php } else { ?>
        	<a href="<?php echo site_url('login');?>">
                <div class="log">
                    <div class="icon"><img src="<?php echo base_url('style/images/icon-login.jpg');?>"/></div>Member Login
                </div>
            </a>
            <div class="text">
            	<strong>Selamat datang di Sistem Informasi Manajemen Pelatihan</strong><br/>
                <small>Untuk mendaftar Pelatihan, silakan pilih (klik) jadwal dan Batch yang Anda inginkan</small>
            </div>
        <?php } ?>
		<?= $header?>
    	</div>
    <?php if($this->session->userdata('id_hak') != null && $this->session->userdata('id_hak') != 3){ ?>
        <nav id="menu">
            <ul>
                <li><a href="<?php echo site_url('admin_home');?>" class="home">Home</a></li>
				<?php if ($this->session->userdata('id_hak')==1){ ?>
					<li><a href="#" class="admin">Admin</a>
						<ul>
							<li><a href="<?php echo site_url('user/user_management');?>">Master User</a></li>
							<li><a href="<?php echo site_url('lisensi/lisensi');?>">Daftar Lisensi</a></li>
							<li><a href="<?php echo site_url('batch/batch/all_batch');?>">Daftar Seluruh Batch</a></li>
							<li><a href="<?php echo site_url('lisensi/master_kota');?>">Master Kota</a></li>
							<li><a href="<?php echo site_url('admin_home/backup');?>">Backup Database</a></li>
						</ul>
					</li>
					
				<?php } ?>
				
				<?php
					if ($this->session->userdata('id_hak') == 1 || $this->session->userdata('id_hak') == 2){
				?>
				<li><a href="#" class="grafik">Grafik</a>
					<ul>
						<?php
							if ($this->session->userdata('id_hak') == 1){
						?>
						<li><a href="<?php echo site_url('grafik');?>">Jumlah Peserta Tiap Lisensi</a></li>
						<?}?>
						<li><a href="<?php echo site_url('grafik/pertumbuhan_peserta');?>">Pertumbuhan Peserta</a></li>
						<li><a href="<?php echo site_url('grafik/profesi');?>">Peserta Per Profesi</a></li>
						<li><a href="<?php echo site_url('grafik/jenis_kelamin');?>">Peserta Per Jenis Kelamin</a></li>
					</ul>
					</li>
				<?}?>
				
				<?php
					if ($this->session->userdata('id_lisensi') != 0){
				?>
				
				<li><a href="#" class="batch">Batch</a>
                    <ul>
						<li><a href="<?php echo site_url('batch/batch/booking_batch');?>">Booking Batch</a></li>
						<li><a href="<?php echo site_url('batch/batch');?>">Daftar Batch</a></li>
						
                    </ul>
                </li>
                <li><a href="#" class="entry">Peserta</a>
                    <ul>
                        <li><a href="<?php echo site_url('peserta/peserta');?>">Daftar Peserta</a></li>
                        <li><a href="<?php echo site_url('peserta/peserta_fix');?>">Daftar Peserta Fix</a></li>
                        <li><a href="<?php echo site_url('peserta/peserta_lulus');?>">Daftar Peserta Lulus</a></li>
                        <li><a href="<?php echo site_url('alumni/alumni');?>">Daftar Alumni</a></li>
                    </ul>
                </li>
				<?php } ?>
            </ul>
         </nav>
     </header>
    <?php } ?>
	<div id="wrapper" class="clearfix">
		<div id="maincol"><?= $content;?></div>
	</div>
	<footer>
    	<div class="text1">
        Research and Development Team<br/>
 		© simpel 2013
        </div>
        <div class="text2">
        	versi 1.23
        </div>
		<?= $footer?>
    </footer>
	</div>
</body>
</html>
